package com.aabte.design.pattern.behavioral.visitor;

/**
 * 访问者类
 */
public class Visitor implements IVisitor {
    @Override
    public void visit(FreeCourse course) {
        System.out.println("免费课程：" + course.getName());
    }

    @Override
    public void visit(CodingCourse course) {
        System.out.println("实战课程：" + course.getName()+"， 价格：" + course.getPrice());
    }
}
